<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.lmpop.trade.ti_shipping_area.*" %>
<jsp:useBean id="randomId" class="com.lmpop.frame.util.RandomID" scope="page" />  
<html>

<%
	String shipping_area_id =  randomId.GenTradeId();
	String shipping_id="",area_id="",area_name="";	
	if(request.getParameter("shipping_id")!=null){
	      shipping_id =request.getParameter("shipping_id");		  
	}
	
	if(request.getParameter("area_id")!=null &&request.getParameter("area_id").equals("")){
	      area_id =request.getParameter("area_id");		 
	}
	 Ti_shipping_areaInfo areainfo = new Ti_shipping_areaInfo();
		 String selectname =areainfo.getareanameSelectItem("");
		 area_name=areainfo.getareanameById(area_id);
%>
  <head>
    <title>配送区域设置管理</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="shipping_area.js"></script> 
</head>

<body>
	<h1>新增配送区域设置</h1>
	
	
	<form action="/doTradeReg.do" method="post" name="addForm">
	
	<input name="shipping_area_name" id="shipping_area_name" type="hidden" />
	
	<table width="100%" cellpadding="0" cellspacing="1" border="0" class="listtab">
		
		<tr>
			
			<td align="right" width="15%">
				请选择地区<font color="red">*</font>
			</td>
			<td colspan="3"><select name="area_id" id="area_id"  onclick="" style="width:80px;">
					  <option value="">请选择</option>
					  <%=selectname%>
				</select></td>
		</tr>
		
		<tr>
			<td align="right" width="10%" >
				计算方式:
			</td>
			<td colspan="3"><input name="cal_type" id="cal_type" type="radio" value="0" checked onclick="checkvalue(0)"  />按重量计算
				<input name="cal_type" id="cal_type" type="radio" value="1" onclick="checkvalue(1)" />按商品件数计算</td>
		</tr>
		<tr>
			<td align="right" width="10%">
				单件费用<font color="red">*</font>
			</td>
			<td colspan="3"><input name="one_fare" id="one_fare" value="0.00"type="text" size="5" maxlength="5" onkeyup="if(isNaN(this.value))this.value=''" onBlur="this.value=trim(value)"/>元</td>
		</tr>
		
		<tr>
			<td align="right" width="10%" >
				首重费用<font color="red">*</font>
			</td>
			<td><input name="first_fare" id="first_fare" type="text" value="0.00" size="5" maxlength="5" onkeyup="if(isNaN(this.value))this.value=''" onBlur="this.value=trim(value)"/>元</td>
			<td align="right" width="10%">
				续重费用<font color="red">*</font>
			</td>
			<td><input name="con_fare" id="con_fare" type="text" value="0.00" size="5" maxlength="5" onkeyup="if(isNaN(this.value))this.value=''" onBlur="this.value=trim(value)"/>元</td>
		</tr>
		
		<tr>
			<td align="right" width="10%" >
				免费额度:
			</td>
			<td colspan="3"><input name="free_fare" id="free_fare" type="text" value="0.00" size="5" maxlength="5" onkeyup="if(isNaN(this.value))this.value=''" onBlur="this.value=trim(value)"/>元</td>
		</tr>
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
			   <input name="arrive_fare" id="arrive_fare" value="0" type="hidden" />
			   <input  type="hidden" name="shipping_area_id" id="shipping_area_id" value="<%=shipping_area_id%>"  />
			   <input  type="hidden" name="shipping_id" id="shipping_id" value="<%=shipping_id%>"  />
				<input type="hidden" name="bpm_id" value="1516" />
				<input type="button" class="buttoncss" name="tradeSub" value="提交" onclick="return checkInfo();" />&nbsp;&nbsp;
				<input type="button" class="buttoncss" name="tradeRut" value="返回" onclick="window.location.href='shipping_areaindex.jsp?shipping_id=<%=shipping_id%>';"/>
			</td>
		</tr>
	</table>
	</form>
</body>

</html>
